﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace TimeProject.WebSite.ViewModels
{
    public partial class MyOrganizationViewModel : ViewModelBase
    {
        /// <summary>
        /// Contains members of the organization if the current user is allowed to manage the organization.
        /// </summary>
        public List<MyOrganizationMemberViewModel> Members { get; set; }

        /// <summary>
        /// The public organization id.
        /// </summary>
        [Display(Name = "Organization ID")]
        public string PublicId { get; set; }

        /// <summary>
        /// The organization code.
        /// </summary>
        [Display(Name = "Code")]
        public string Code { get; set; }

        /// <summary>
        /// The organization's full name.
        /// </summary>
        [Display(Name = "Full name")]
        public string FullName { get; set; }

        /// <summary>
        /// The description text.
        /// </summary>
        [Display(Name = "Description")]
        public string Description { get; set; }

        /// <summary>
        /// The role of the current user in the organization.
        /// </summary>
        [Display(Name = "My role")]
        public string MyRole { get; set; }

        /// <summary>
        /// Is the organization selected on the view.
        /// </summary>
        public bool IsSelected { get; set; }

        /// <summary>
        /// Is the organization data fully loaded.
        /// </summary>
        public bool IsFullyLoaded { get; set; }

        /// <summary>
        /// Is the organization new and not yet saved.
        /// </summary>
        public bool IsNew { get; set; }

        /// <summary>
        /// Is the organization marked as deleted.
        /// </summary>
        public bool IsDeleted { get; set; }

        /// <summary>
        /// Is the current user allowed to manage the organization.
        /// </summary>
        public bool IsManageAllowed { get; set; }

        /// <summary>
        /// Is the current user allowed to delete the organization.
        /// </summary>
        public bool IsDeleteAllowed { get; set; }

        /// <summary>
        /// Is the current user allowed to remove membership.
        /// </summary>
        public bool IsRemoveMembershipAllowed { get; set; }

        public MyOrganizationViewModel()
        {
            Members = new List<MyOrganizationMemberViewModel>();
        }

    }
}
